﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>登录页面</title>
    <script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <script src="Scripts/jquery.form.js" type="text/javascript"></script>
    <script src="Scripts/supersleight.plugin.js" type="text/javascript"></script>
    <script type="text/javascript">
        function QueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;
        }
        jQuery(function () {
            jQuery('body').supersleight({ shim: 'Images/x.gif' });

            var url = QueryString("url");
            jQuery("#login_form").ajaxForm({
                // dataType identifies the expected content type of the server response 
                dataType: 'json',
                beforeSubmit: function (arr, $form, options) {
                    if ($form[0].user.value == "") {
                        jQuery("#lblMsg").html("用户名不得为空！");
                        return false;
                    }
                    if ($form[0].pwd.value == "") {
                        jQuery("#lblMsg").html("密码不得为空！");
                        return false;
                    }

                    jQuery("#lblMsg").html("登录中,请等待...");
                },
                // success identifies the function to invoke when the server response 
                // has been received 
                success: function (data) {
                    if (data.success) {
                        if (url) {
                            url = url.replace("~/", "/");
                        }
                        else {
                            url = "/Default.aspx";
                        }
                        jQuery("#lblMsg").html("立即转向<a href='" + url + "' alt='" + url + "'>" + url + "</a>");
                        setTimeout(function () { window.location.href(url); }, 1000);
                    }
                    else {
                        jQuery("#lblMsg").html(data.data);
                    }
                }
            });
            jQuery("#btnsubmit").click(function () {
                try {
                    jQuery("#login_form").submit();
                }
                catch (e) {
                }
            });
        });
    </script>
    <style type="text/css">
        *
        {
            padding: 0;
            margin: 0;
        }
        body
        {
            background: #509EE0;
            font-size: 14px;
        }
        a
        {
            color: #999;
            text-decoration: none;
        }
        a:hover
        {
            color: #666;
        }
        a:linked
        {
            color: #666;
        }
        
        #form_container
        {
            width: 535px;
            height: 435px;
            margin: 80px auto 0 auto;
            background-image: url(Images/bg_login.jpg);
        }
        #login_form
        {
        }
        
        .bg-input
        {
            margin-left: 16px;
            width:280px;
            padding:2px;
            border:1px solid #999;
            background-color: white;
        }
        #user, #pwd
        {
            width: 264px;
            height: 20px;
            border: 0 none transparent;
            margin:0;
        }
        #btnsubmit
        {
            display: block;
            margin-left: 16px;
            width: 60px;
            height: 32px;
            line-height: 32px;
            text-align: center;
            background-image: url(Images/bg_button.jpg);
        }
    </style>
    <!---->
</head>
<body>
    <div id="form_container">
        <div id="title_container" style="height: 111px;">
            <span style="display: block; margin: 40px 0 0 20px; font-size: 48px; color: white;
                font-weight: 900;">DotNETX</span>
        </div>
        <div id="body_container" style="padding: 62px 20px 0 48px">
            <form id="login_form" action="Login.ashx">
            <table style="width: 100%; height: 220px;">
                <tr>
                    <td dir="rtl" style="width: 100px;">
                        用户
                    </td>
                    <td>
                        <div class="bg-input"><input id="user" name="user" type="text" /></div>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td dir="rtl">
                        密码
                    </td>
                    <td>
                        <div class="bg-input"><input type="password" id="pwd" name="pwd" /></div>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td dir="rtl">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td dir="rtl">
                        &nbsp;
                    </td>
                    <td>
                        <a id="btnsubmit" href="javascript:void();" title="提交">提交</a>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td dir="rtl">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td dir="rtl">
                        &nbsp;
                    </td>
                    <td>
                        <div id="msg_container" style="font-size: 14px; text-align: center; clear: both;
                            overflow: visible">
                            <span id="lblMsg">&nbsp;</span>
                        </div>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
            <div style="width: 0; height: 0; overflow: hidden;">
                <input type="hidden" id="act" name="act" value="login" />
                <input type="submit" style="width: 0; height: 0; display: block;" id="btnLogin" title="登录"
                    value=" " />
            </div>
            </form>
        </div>
    </div>
</body>
</html>
